package com.hanson.service.impl;

import com.aliyun.oss.OSSClient;
import com.hanson.service.AliYunOSService;
import com.hanson.utils.AliYunOSSUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.InputStream;

/**
 * @description:
 * @classname: AliYunOOSServiceImpl
 * @author: Hanson
 * @create: 2021/01/13
 **/
@Service
@Slf4j
public class AliYunOSServiceImpl implements AliYunOSService {

    @Autowired
    AliYunOSSUtil aliYunOSS;

    @Override
    public String uploadMallImage(String fileName, String filePath, InputStream inputStream, OSSClient ossClient, String bucketName, String fileHost,boolean useMyDNS) {
        return aliYunOSS.uploadFile(fileName, filePath, inputStream, ossClient, bucketName, fileHost,useMyDNS);
    }
}
